# 设置CMake最低版本
cmake_minimum_required(VERSION 2.8)
# 设置项目名
project(image_box)
# 设置C++标准
set(CMAKE_CXX_STANDARD 11)
add_compile_options(-std=c++11)



## ros
#set(catkin_DIR /opt/ros/noetic/share/catkin/cmake)
find_package(catkin REQUIRED COMPONENTS
        roscpp
        rospy
        std_msgs
        cv_bridge
        image_transport
        )

catkin_package(
        CATKIN_DEPENDS
)

# OpenCV
find_package(OpenCV 3.1 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})


# glog
find_package(Glog REQUIRED)
include_directories(${GLOG_INCLUDE_DIRS})

# gtest
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})

# gflags
find_package(GFlags REQUIRED)
include_directories(${GFLAGS_INCLUDE_DIRS})


include_directories(
        include
        ${catkin_INCLUDE_DIRS}
)


set(THIRD_PARTY_LIBS

        ${GTEST_BOTH_LIBRARIES}
        ${GLOG_LIBRARIES}
        ${GFLAGS_LIBRARIES}
        ${OpenCV_LIBRARIES}
        ${catkin_LIBRARIES}
        )


add_executable(main App/main.cpp include/image_box/image.h)
add_dependencies(main ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(main
        ${THIRD_PARTY_LIBS}
        )




